home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group94a.txt
/
000176_icon-group-sender _Thu Jun 16 10:17:20 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1994-08-19
|
1KB
Received: by cheltenham.cs.arizona.edu; Thu, 16 Jun 1994 12:22:34 MST
Date: Thu, 16 Jun 1994 10:17:20 +0700
From: swampler@noao.edu
Message-Id: <9406161717.AA18280@orpheus.gemini.edu>
Subject: Re: Another Spin
To: Mark.Otto@census.gov
Cc: icon-group@cs.arizona.edu
Content-Length: 767
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
>>Not to take the fun out of writing coexpressions,
>>but here is a simpler version of spin I got to
>>work on a SUN4. Use ^c to stop the program.
>>
>>procedure main()
>> writes(" ")
>> every writes(!|["\b-","\b\\","\b|","\b/"])
>>end
>>
How about:
procedure main()
every writes(|!"-\b\\=b|\b/\b")
end
but to neatly 'spin' any sequence:
procedure main(args)
spin_word := args[1] | "-\\|/"
every writes( weave (spin_word, "\b") )
end
procedure weave(s1,s2)
e1 := create |!s1 # infinite loop of chars from s1
e2 := create |!s2 # infinite loop of chars from s2
suspend @!(e1 | e2) # this expression interleaves result sequences
end
--
Steve Wampler
swampler@gemini.edu
Gemini Project (under AURA)